<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<{$Charset}>">
<link rel="stylesheet" type="text/css" href="css/main.css">
<script language="javascript" src="<{$JS_PATH}>js/general.js"></script>
<script language="javascript" src="<{$JS_PATH}>js/prototype.js"></script>
<script language="javascript" src="<{$JS_PATH}>js/admin.js"></script>
<style>
<!--
body         { font-family: Tahoma; font-size: 8pt }
.leftmenu {
        width:300px;
}
.leftmenu li {
		float:left;
        display: inline;
        white-space: nowrap;
}

.leftmenu span,
.leftmenu a:active,
.leftmenu a:visited,
.leftmenu a:link {
	display: block;
	text-decoration: none;
	margin: 6px 10px 6px 0px;
	padding: 2px 6px 2px 6px;
	color: #00527f;
	background-color: #d9e8f3;
	border: 1px solid #004266;
}

.leftmenu a:hover {
	color: red;
	background-color: #8cbbda;
}

.leftmenu span {
	color: #a13100;
	}
-->
</style>
<script>
function checkImport(){
	if($F('io_from')==""){
		alert("如果要导入,请选择导入来源");
		return false;
	}
	return true;
}
// onchange="setDB(this.options[this.options.selectedIndex].value)"
function setDB(from){
	if(from==1){
		$('io_from').value = 1;
		$('io_dbname').value = "discuz";
		$('io_tbname').value = "cdb_members";
		$('fromDIV').innerHTML = "Discuz";
	}else if(from==2){
		$('io_from').value = 2;
		$('io_tbname').value = "pw_members";
		$('io_dbname').value = "phpwind";
		$('fromDIV').innerHTML = "PHPWIND";
	}
}
</script>
</head>

<body leftmargin="10" topmargin="10">
<table width="100%" border="0" cellpadding="2" cellspacing="6"><tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="guide"><tr>
  <td><div align="left"><a href="#" onClick="parent.main.location='home.php';return false;">控制台</a>&nbsp;&raquo;&nbsp;导入导出</div></td>
</tr>
</table>
<ul class="leftmenu">
<li><a href="#" onClick="setDB(1);">Discuz论坛</a>
<li><a href="#" onClick="setDB(2);">PHPWIND论坛</a>
</ul>
<form name="iofrm" method="post" enctype="multipart/form-data" action="<{$smarty.server.PHP_SELF}>">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">
<tr class="header">
  <td colspan="5">导入其他软件中的数据到网站里</td>
</tr>

<tr>
  <td class="altbg1" width="24%"><strong>从何处导入:</strong></td>
  <td width="76%" colspan="4" class="altbg2"><div id="fromDIV">请在上面点击选择导入来源</div>
  <input type="hidden" name="io[from]" id="io_from" value=""></td>
</tr>
<tr>
  <td class="altbg1"><strong>数据库连接地址:</strong></td>
  <td colspan="4" class="altbg2"><input name="io[hostname]" type="text" id="io[hostname]" value="<{$dbInfo.dbhost}>" /></td>
</tr>
<tr>
  <td class="altbg1" width="24%"><strong>数据库名称:</strong></td>
  <td width="76%" colspan="4" class="altbg2"><input name="io[dbname]" type="text" id="io_dbname" value="" /></td>
</tr>

<tr>
  <td class="altbg1"><strong>访问用户名:</strong></td>
  <td colspan="4" class="altbg2"><input name="io[username]" type="text" id="io[username]" value="<{$dbInfo.dbuser}>" /></td>
</tr>


<tr>
  <td class="altbg1"><strong>访问密码:</strong></td>
  <td colspan="4" class="altbg2"><input name="io[userpass]" type="password" id="io[userpass]" value="" />&nbsp;<h4 style="color:red;display:inline;font-family:Arial">!</h4>&nbsp;请重新输入该用户名对应的数据库密码</td>
</tr>
<tr>
<td class="altbg1"><strong>数据表名称:</strong></td>
<td colspan="4" class="altbg2"><input type="text" name="io[tbname]" id="io_tbname" value="" /></td>
</tr>
<tbody id="m_source_addr" style="display:none">
</tbody>
<tbody id="m_source_upload" style="display:block">
</tbody>
<tr>
  <td class="altbg1"><strong>数据导入方式：</strong></td>
  <td colspan="4" class="altbg2">
  <input type="radio" name="io[method]" value="1" checked />附加在现有表上<input type="radio" name="io[method]" value="2" />清空现有表再重新导入</td>
</tr>
<tr>
  <td class="altbg1"><strong>导入为会员类型：</strong></td>
  <td colspan="4" class="altbg2"><select name="member[user_type]" id="MemberUserType">
	<{html_options options=$UserTypes}>
	</select></td>
</tr>



<tr><td colspan="5" class="altbg1"><div align="center">
  <input type="submit" name="start" value="开始导入" class="btn_mouseout" onMouseOver="this.className='btn_mouseover'" onMouseOut="this.className='btn_mouseout'" id="start" onClick="return checkImport();" />
</div></td>
</tr>
</table>
<br />
<center>
</center>
</form>
</td></tr></table>
<br /><br />
</body>
</html>

